package com.laughing.httpserver;

import com.laughing.httpserver.core.BootStrap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author laughing.sheng <laughing1917@yeah.net/>
 * @date 2018/1/25
 * @see
 */
@SpringBootApplication
public class SpringBootCoreApplication implements CommandLineRunner {

    @Autowired
    private BootStrap bioBootStrap;

    public static void main(String[] args) {
        SpringApplication.run(SpringBootCoreApplication.class, args);
    }

    /**
     * 回调方法
     */
    @Override
    public void run(String... args){
        new Thread(bioBootStrap).start();
    }
}